﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Trie
{
    class Program
    {
        static void Main(string[] args)
        {
            Trie t = new Trie();
            t.AddWord("tree");
            t.AddWord("trie");
            t.AddWord("algo");
            t.AddWord("assoc");
            t.AddWord("all");
            t.AddWord("also");
            Console.WriteLine(t.CountPrefixes("al"));
            Console.ReadKey();
        }
    }
}
